var mongoose = require("./db.js")

var Schema = mongoose.Schema;

var commoditySchema = new Schema({
    //商品标题
    commodityTitle:{type:String},
    //最大价格
    maxPrice:{type:Number},
    //最低价格
    minPrice:{type:Number},
    //折扣后最低单价
    unitMinPrice:{type:Number},
    //折扣后最高单价
    unitMaxPrice:{type:Number},
    //商品图片
    commodityImg:{type:Array},
     //商品图片大
    commodityImgBig:{type:Array},
     //商品图片小
    commodityImgSmall:{type:Array},
    //判断布局
    commodityFlag:{type:Boolean},
    //商品分类
    commodityClassify:{type:String},
    //规格specification={type:Object},
    //商品属性commodityProperty={type:Object},
    //商品图片commodityPhoto={type:Array},
    //店铺id  shopId={type:Number}
})
var commodity = mongoose.model("commodity",commoditySchema,"commodity")
module.exports = commodity
